package com.aidex.system.service;

import com.aidex.common.core.service.BasicService;
import com.alibaba.fastjson2.JSONObject;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.system.domain.SysUserRole;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysUserService extends BasicService<SysUser> {

    SysUser selectUserByUserName(String userName);

    String selectUserRoleGroup(String userName);

    String selectUserPostGroup(String userName);

    void checkUserNameUnique(SysUser user);

    void checkPhoneUnique(SysUser user);

    void checkEmailUnique(SysUser user);

    void checkUserAllowed(SysUser user);

    String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);

    boolean insertRoleUser(SysUserRole sysUserRole);

    void insertUserPost(SysUser user);

    void insertUserRole(SysUser user);

    boolean registerUser(SysUser user);

    void refreshCache();

    void loadingUserCache();

    int resetUserPwd(String userName, String encryptPassword);

    void checkUserDataScope(String userId);

    IPage<SysUser> selectPageByRoleId(IPage<SysUser> page, QueryWrapper<SysUser> queryWrapper);
}
